<!--到货通知单选择商品-->
<template>

    <div class="page-box">

       <div class="page-section">
            <!--数据表格-->
            <el-table :data="tableData" row-key="Id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" 
            ref="dataForm" v-loading="isLoading" height="360">
                <el-table-column type="selection" width="70"></el-table-column>
                <el-table-column prop="ItemCode" label="物料编码" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="ItemName" label="物料名称" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Model" label="型号" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Spec" label="规格" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="UnitOfMeasure" label="单位" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Quantity" label="可检验次数" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column label="操作" :show-overflow-tooltip="true">
                    <template slot-scope="scope">
                        <el-button type="text" @click="Checked(scope.row)">选择</el-button>
                    </template>
                </el-table-column>
            </el-table>
       </div>

       

    </div>
    
</template>

<script>


export default {
    props:{
         WareHouseInboundBillId: {
              require: true,
              type: String
          },
      },
    data(){
        return {
            isLoading:false,
            tableData:[]
        }
    },
    mounted(){
        this.dataBind();
    },
    methods:{
        dataBind(){
            this.isLoading = true;
            this.$http.get('/api/QcReceiveRecord/GetItemByWareHouseInboundBillId',
            {
               params:{
                    WareHouseInboundBillId:this.WareHouseInboundBillId,
               }
            })
            .then(res => {
                this.tableData=res.Data;
                this.isLoading = false;
            })
        },
        Checked(model){

            this.$emit('callback',model);
        },
    }
}

</script>

<style scoped></style>

